import "@/router/utils/rewrite";
import { createSSRApp } from "vue";
import { createPinia } from "pinia";
import piniaPersist from "pinia-plugin-persist-uni";
import App from "./App.vue";
import router from "@/router";
import "dayjs/locale/zh-cn";

export function createApp() {
    const app = createSSRApp(App);
    const pinia = createPinia();

    pinia.use(piniaPersist);
    app.use(pinia).use(router);

    return {
        app,
        pinia
    };
}
